#ifndef BUCQUAGE_H
#define BUCQUAGE_H

#include <pg.h>
#include <Clavier/clavier.h>
#include <statistiques.h>

#include <QWidget>
#include <QStringList>
#include <QMessageBox>
#include <QListWidgetItem>
#include <QList>
#include <QSettings>

namespace Ui {
class Bucquage;
}

class Bucquage : public QWidget
{
    Q_OBJECT
    
public:
    explicit Bucquage(Pg *p, QWidget *parent = 0);
    ~Bucquage();
    
public slots:

    void majListeConso();
    void majChoix();
    void ajouterConso(QListWidgetItem *it);
    void retirerConso(QListWidgetItem *it);

signals:
    void termine();

protected:
    void keyPressEvent(QKeyEvent *e);

private slots:
    void on_ButtonAnnuler_clicked();
    void on_ButtonBucquer_clicked();


private:
    Ui::Bucquage *ui;
    Pg *pg;
    Clavier *clavier;
    QString recherche;
    QSqlDatabase db;

    QStringList consos;
    QList<int> nbConsos;
    QList<double> prixConsos;

    QPalette couleurPos;
    QPalette couleurNeg;


    bool tactile;
    bool gestionStocks;
};

#endif // BUCQUAGE_H
